(0) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1).


The TRS R consists of the following rules:

fst(0, Z) → nil
fst(s(X), cons(Y, Z)) → cons(Y, n__fst(activate(X), activate(Z)))
from(X) → cons(X, n__from(s(X)))
add(0, X) → X
add(s(X), Y) → s(n__add(activate(X), Y))
len(nil) → 0
len(cons(X, Z)) → s(n__len(activate(Z)))
fst(X1, X2) → n__fst(X1, X2)
from(X) → n__from(X)
add(X1, X2) → n__add(X1, X2)
len(X) → n__len(X)
activate(n__fst(X1, X2)) → fst(X1, X2)
activate(n__from(X)) → from(X)
activate(n__add(X1, X2)) → add(X1, X2)
activate(n__len(X)) → len(X)
activate(X) → X

Rewrite Strategy: INNERMOST

(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)

Converted Cpx (relative) TRS to CDT

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

fst(0, z0) → nil
fst(s(z0), cons(z1, z2)) → cons(z1, n__fst(activate(z0), activate(z2)))
fst(z0, z1) → n__fst(z0, z1)
from(z0) → cons(z0, n__from(s(z0)))
from(z0) → n__from(z0)
add(0, z0) → z0
add(s(z0), z1) → s(n__add(activate(z0), z1))
add(z0, z1) → n__add(z0, z1)
len(nil) → 0
len(cons(z0, z1)) → s(n__len(activate(z1)))
len(z0) → n__len(z0)
activate(n__fst(z0, z1)) → fst(z0, z1)
activate(n__from(z0)) → from(z0)
activate(n__add(z0, z1)) → add(z0, z1)
activate(n__len(z0)) → len(z0)
activate(z0) → z0
Tuples:

FST(0, z0) → c
FST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z0), ACTIVATE(z2))
FST(z0, z1) → c2
FROM(z0) → c3
FROM(z0) → c4
ADD(0, z0) → c5
ADD(s(z0), z1) → c6(ACTIVATE(z0))
ADD(z0, z1) → c7
LEN(nil) → c8
LEN(cons(z0, z1)) → c9(ACTIVATE(z1))
LEN(z0) → c10
ACTIVATE(n__fst(z0, z1)) → c11(FST(z0, z1))
ACTIVATE(n__from(z0)) → c12(FROM(z0))
ACTIVATE(n__add(z0, z1)) → c13(ADD(z0, z1))
ACTIVATE(n__len(z0)) → c14(LEN(z0))
ACTIVATE(z0) → c15
S tuples:

FST(0, z0) → c
FST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z0), ACTIVATE(z2))
FST(z0, z1) → c2
FROM(z0) → c3
FROM(z0) → c4
ADD(0, z0) → c5
ADD(s(z0), z1) → c6(ACTIVATE(z0))
ADD(z0, z1) → c7
LEN(nil) → c8
LEN(cons(z0, z1)) → c9(ACTIVATE(z1))
LEN(z0) → c10
ACTIVATE(n__fst(z0, z1)) → c11(FST(z0, z1))
ACTIVATE(n__from(z0)) → c12(FROM(z0))
ACTIVATE(n__add(z0, z1)) → c13(ADD(z0, z1))
ACTIVATE(n__len(z0)) → c14(LEN(z0))
ACTIVATE(z0) → c15
K tuples:none
Defined Rule Symbols:

fst, from, add, len, activate

Defined Pair Symbols:

FST, FROM, ADD, LEN, ACTIVATE

Compound Symbols:

c, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15

(3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)

Removed 10 trailing nodes:

ACTIVATE(z0) → c15
ADD(0, z0) → c5
FST(z0, z1) → c2
FROM(z0) → c3
ADD(z0, z1) → c7
LEN(nil) → c8
ACTIVATE(n__from(z0)) → c12(FROM(z0))
FST(0, z0) → c
FROM(z0) → c4
LEN(z0) → c10

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

fst(0, z0) → nil
fst(s(z0), cons(z1, z2)) → cons(z1, n__fst(activate(z0), activate(z2)))
fst(z0, z1) → n__fst(z0, z1)
from(z0) → cons(z0, n__from(s(z0)))
from(z0) → n__from(z0)
add(0, z0) → z0
add(s(z0), z1) → s(n__add(activate(z0), z1))
add(z0, z1) → n__add(z0, z1)
len(nil) → 0
len(cons(z0, z1)) → s(n__len(activate(z1)))
len(z0) → n__len(z0)
activate(n__fst(z0, z1)) → fst(z0, z1)
activate(n__from(z0)) → from(z0)
activate(n__add(z0, z1)) → add(z0, z1)
activate(n__len(z0)) → len(z0)
activate(z0) → z0
Tuples:

FST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z0), ACTIVATE(z2))
ADD(s(z0), z1) → c6(ACTIVATE(z0))
LEN(cons(z0, z1)) → c9(ACTIVATE(z1))
ACTIVATE(n__fst(z0, z1)) → c11(FST(z0, z1))
ACTIVATE(n__add(z0, z1)) → c13(ADD(z0, z1))
ACTIVATE(n__len(z0)) → c14(LEN(z0))
S tuples:

FST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z0), ACTIVATE(z2))
ADD(s(z0), z1) → c6(ACTIVATE(z0))
LEN(cons(z0, z1)) → c9(ACTIVATE(z1))
ACTIVATE(n__fst(z0, z1)) → c11(FST(z0, z1))
ACTIVATE(n__add(z0, z1)) → c13(ADD(z0, z1))
ACTIVATE(n__len(z0)) → c14(LEN(z0))
K tuples:none
Defined Rule Symbols:

fst, from, add, len, activate

Defined Pair Symbols:

FST, ADD, LEN, ACTIVATE

Compound Symbols:

c1, c6, c9, c11, c13, c14

(5) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

fst(0, z0) → nil
fst(s(z0), cons(z1, z2)) → cons(z1, n__fst(activate(z0), activate(z2)))
fst(z0, z1) → n__fst(z0, z1)
from(z0) → cons(z0, n__from(s(z0)))
from(z0) → n__from(z0)
add(0, z0) → z0
add(s(z0), z1) → s(n__add(activate(z0), z1))
add(z0, z1) → n__add(z0, z1)
len(nil) → 0
len(cons(z0, z1)) → s(n__len(activate(z1)))
len(z0) → n__len(z0)
activate(n__fst(z0, z1)) → fst(z0, z1)
activate(n__from(z0)) → from(z0)
activate(n__add(z0, z1)) → add(z0, z1)
activate(n__len(z0)) → len(z0)
activate(z0) → z0

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

FST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z0), ACTIVATE(z2))
ADD(s(z0), z1) → c6(ACTIVATE(z0))
LEN(cons(z0, z1)) → c9(ACTIVATE(z1))
ACTIVATE(n__fst(z0, z1)) → c11(FST(z0, z1))
ACTIVATE(n__add(z0, z1)) → c13(ADD(z0, z1))
ACTIVATE(n__len(z0)) → c14(LEN(z0))
S tuples:

FST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z0), ACTIVATE(z2))
ADD(s(z0), z1) → c6(ACTIVATE(z0))
LEN(cons(z0, z1)) → c9(ACTIVATE(z1))
ACTIVATE(n__fst(z0, z1)) → c11(FST(z0, z1))
ACTIVATE(n__add(z0, z1)) → c13(ADD(z0, z1))
ACTIVATE(n__len(z0)) → c14(LEN(z0))
K tuples:none
Defined Rule Symbols:none

Defined Pair Symbols:

FST, ADD, LEN, ACTIVATE

Compound Symbols:

c1, c6, c9, c11, c13, c14

(7) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

FST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z0), ACTIVATE(z2))
LEN(cons(z0, z1)) → c9(ACTIVATE(z1))
We considered the (Usable) Rules:none
And the Tuples:

FST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z0), ACTIVATE(z2))
ADD(s(z0), z1) → c6(ACTIVATE(z0))
LEN(cons(z0, z1)) → c9(ACTIVATE(z1))
ACTIVATE(n__fst(z0, z1)) → c11(FST(z0, z1))
ACTIVATE(n__add(z0, z1)) → c13(ADD(z0, z1))
ACTIVATE(n__len(z0)) → c14(LEN(z0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(ACTIVATE(x1)) = [2]x1   
POL(ADD(x1, x2)) = [2]x1   
POL(FST(x1, x2)) = [2]x1 + [2]x2   
POL(LEN(x1)) = [2]x1   
POL(c1(x1, x2)) = x1 + x2   
POL(c11(x1)) = x1   
POL(c13(x1)) = x1   
POL(c14(x1)) = x1   
POL(c6(x1)) = x1   
POL(c9(x1)) = x1   
POL(cons(x1, x2)) = [2] + x2   
POL(n__add(x1, x2)) = x1   
POL(n__fst(x1, x2)) = x1 + x2   
POL(n__len(x1)) = x1   
POL(s(x1)) = x1   

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

FST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z0), ACTIVATE(z2))
ADD(s(z0), z1) → c6(ACTIVATE(z0))
LEN(cons(z0, z1)) → c9(ACTIVATE(z1))
ACTIVATE(n__fst(z0, z1)) → c11(FST(z0, z1))
ACTIVATE(n__add(z0, z1)) → c13(ADD(z0, z1))
ACTIVATE(n__len(z0)) → c14(LEN(z0))
S tuples:

ADD(s(z0), z1) → c6(ACTIVATE(z0))
ACTIVATE(n__fst(z0, z1)) → c11(FST(z0, z1))
ACTIVATE(n__add(z0, z1)) → c13(ADD(z0, z1))
ACTIVATE(n__len(z0)) → c14(LEN(z0))
K tuples:

FST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z0), ACTIVATE(z2))
LEN(cons(z0, z1)) → c9(ACTIVATE(z1))
Defined Rule Symbols:none

Defined Pair Symbols:

FST, ADD, LEN, ACTIVATE

Compound Symbols:

c1, c6, c9, c11, c13, c14

(9) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

ADD(s(z0), z1) → c6(ACTIVATE(z0))
ACTIVATE(n__len(z0)) → c14(LEN(z0))
We considered the (Usable) Rules:none
And the Tuples:

FST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z0), ACTIVATE(z2))
ADD(s(z0), z1) → c6(ACTIVATE(z0))
LEN(cons(z0, z1)) → c9(ACTIVATE(z1))
ACTIVATE(n__fst(z0, z1)) → c11(FST(z0, z1))
ACTIVATE(n__add(z0, z1)) → c13(ADD(z0, z1))
ACTIVATE(n__len(z0)) → c14(LEN(z0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(ACTIVATE(x1)) = x1   
POL(ADD(x1, x2)) = x1   
POL(FST(x1, x2)) = x1 + x2   
POL(LEN(x1)) = x1   
POL(c1(x1, x2)) = x1 + x2   
POL(c11(x1)) = x1   
POL(c13(x1)) = x1   
POL(c14(x1)) = x1   
POL(c6(x1)) = x1   
POL(c9(x1)) = x1   
POL(cons(x1, x2)) = [1] + x2   
POL(n__add(x1, x2)) = x1   
POL(n__fst(x1, x2)) = x1 + x2   
POL(n__len(x1)) = [1] + x1   
POL(s(x1)) = [1] + x1   

(10) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

FST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z0), ACTIVATE(z2))
ADD(s(z0), z1) → c6(ACTIVATE(z0))
LEN(cons(z0, z1)) → c9(ACTIVATE(z1))
ACTIVATE(n__fst(z0, z1)) → c11(FST(z0, z1))
ACTIVATE(n__add(z0, z1)) → c13(ADD(z0, z1))
ACTIVATE(n__len(z0)) → c14(LEN(z0))
S tuples:

ACTIVATE(n__fst(z0, z1)) → c11(FST(z0, z1))
ACTIVATE(n__add(z0, z1)) → c13(ADD(z0, z1))
K tuples:

FST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z0), ACTIVATE(z2))
LEN(cons(z0, z1)) → c9(ACTIVATE(z1))
ADD(s(z0), z1) → c6(ACTIVATE(z0))
ACTIVATE(n__len(z0)) → c14(LEN(z0))
Defined Rule Symbols:none

Defined Pair Symbols:

FST, ADD, LEN, ACTIVATE

Compound Symbols:

c1, c6, c9, c11, c13, c14

(11) CdtKnowledgeProof (EQUIVALENT transformation)

The following tuples could be moved from S to K by knowledge propagation:

ACTIVATE(n__fst(z0, z1)) → c11(FST(z0, z1))
ACTIVATE(n__add(z0, z1)) → c13(ADD(z0, z1))
FST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z0), ACTIVATE(z2))
ADD(s(z0), z1) → c6(ACTIVATE(z0))
Now S is empty

(12) BOUNDS(1, 1)